import Vue from 'vue'
import VueRouter from 'vue-router'
import home from '../views/home.vue'
import spotlight from "@/views/spotlight/spotlight.vue";
import spotlightMore from "@/views/spotlight/spotlight-list.vue";
import spotlightDetail from "@/views/spotlight/spotlight-detail.vue";
import searchList from "@/views/search-list/search-list.vue";
import imageList from '@/views/image/list'
import mailbox from '@/views/mailbox/list'
import imageDetails from '@/views/image/details'
import videoDetail from '@/views/video/detail'
import videoList from '@/views/video/list'
import imageDetail from '@/views/image/detail'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: home,
  },
  {
    path: '/spotlight',
    name: 'spotlight',
    component: spotlight,
    redirect: '/spotlight/spotlightList',
    children:[{
      path: 'spotlightList',
      component: spotlight,
    },]
  },
  {
    path: '/spotlightMore',
    name: 'spotlightMore',
    component: spotlightMore,
  },
  {
    path: '/spotlightDetail',
    name: 'spotlightDetail',
    component: spotlightDetail,
  },
  {
    path: '/searchList',
    name: 'searchList',
    component: searchList,
  },

  {
    path: '/imageList',
    name: 'imageList',
    component: imageList,
  },
  {
    path: '/mailbox',
    name: 'mailbox',
    component: mailbox,
  },
  {
    path: '/imageDetails',
    name: 'imageDetails',
    component: imageDetails,
  },
  {
    path: '/videoDetail',
    name: 'videoDetail',
    component: videoDetail,
  },
  {
    path: '/imageDetail',
    name: 'imageDetail',
    component: imageDetail,
  },
  {
    path: '/videoList',
    name: 'videoList',
    component: videoList,
  }
]

const router = new VueRouter({
  routes,
    // linkActiveClass: 'active',
})

export default router
